class Representative implements Comparable {

    public final static String REPAIR = "TDC Repair"
    public final static String SALES = "TDC Sales"

    String title
    Person person

    static constraints = {
        title(nullable:false, blank:false)
        person(nullable:false)
    }

    int compareTo(obj) {
        toString().compareTo(obj.toString())
    }

    String toString() {
        person.name + " " + title
    }
}
